/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package entityappclient;

import javax.ejb.EJB;
import lab.session.stateless.HelloWorldBeanRemote;
import session.stateless.CustomerFacadeRemote;
import persistence.entity.Customer;

/**
 *
 * @author Craig
 */
public class HelloWorldClient {
    @EJB
    private static CustomerFacadeRemote customerFacade;
    @EJB
    private static HelloWorldBeanRemote helloWorld;

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        String promt = "HelloWorldClient: ";
        String name = "Craig";
        HelloWorldClient client = new HelloWorldClient();
        client.doGreetings(promt);
        client.doGreetings(promt, name);
        
        System.out.println(customerFacade.findAll());
        System.out.println(customerFacade.authenticate(1, "one", true));
    }
    
    public void doGreetings(String prompt) {
        System.out.println(prompt + helloWorld.getGreetings());
    }
    
    public void doGreetings(String prompt, String name) {
        System.out.println(prompt + helloWorld.getGreetings(name));
    }
}
